<?php

use think\migration\Migrator;
use think\migration\db\Column;

class ControlToEpa extends Migrator
{
    /**
     * 管控 - 下达 - 环保局
     */
    public function change()
    {
        $table = $this->table('control_to_epa');
        $table
            ->addColumn('control_mode_id', 'integer', ['limit' => 2, 'comment' => '管控方式ID,1工业减排2车辆限行3施工管控4道路抑尘',])
            ->addColumn('control_measure_id', 'integer', ['limit' => 2, 'comment' => '管控措施ID,1提效2限产3停产',])
            ->addColumn('company_id', 'integer', ['limit' => 11, 'comment' => '公司ID',])
            ->addColumn('control_plan_number', 'string', ['limit' => 30, 'comment' => '管控编号',])
            ->addColumn('receive_user_id', 'integer', ['limit' => 11, 'comment' => '环保局接收人员ID',])
            ->addColumn('charge_user_id', 'integer', ['limit' => 11, 'comment' => '环保局负责人员ID',])
            ->addColumn('create_time', 'integer', ['limit' => 11, 'comment' => '创建时间',])

            //注释
            ->setComment('管控 - 管控下达')
            //引擎
            ->setEngine('InnoDB')
            ->save();
    }
}
